home *** CD-ROM | disk | FTP | other *** search
-
- DEVICE.LIB - written by Jan Kriesten
- ================================================================================
- (c) 1994,1995 by Jan Kriesten, all rights reserved.
-
- Author: Jan Kriesten
- Friedhofstr. 25 b
- 35043 Marburg
- Germany
- EMail: Maus GI
- 90:400/1002@nest.ftn
- 51:601/103@atarinet.ftn
- 2:2435/707@fidonet.org
- kriesten@Mailer.Uni-Marburg.DE
-
- ================================================================================
-
- Introduction:
- =============
-
- It's the same everytime. You write a program and have to write parts
- of it other programmers have written long time ago for themselves, too.
-
- That was the same for me, too. I was to be writing a new fidonet
- mailer and had to do a lot of research to design all the port i/o
- routines which were written by other authors before. Also, the different
- device drivers (HSModem, FastSerial, ...) needed different support. In
- fact I wished there had been a couple of routines which would have made
- my life easier.
-
- This is the reason I give this library to public. The library contains
- many useful i/o routines for using the ports of your atari. Also it's
- supporting HSModem and MiNT block device drivers as well as FastSerial.
-
- Copyright:
- ==========
-
- Copyright (c) 1994, 1995 by Jan Kriesten
-
- Please notice that the library is not 'public domain' or 'freeware',
- but it's allowed to spread it out (without charging fees) via public
- BBS or public networks like FidoNet. In any case the original archive
- has to be spread out and must not be modified.
-
- It's not allowed to make this library available via other channels like
- pd disk series, cd rom's or channel videodat.
-
- Using this library in commercial/shareware programs is only allowed with
- permission of the author.
-
- Disclaimer:
- ===========
-
- Every care is taken to ensure that these routines are bug free and will
- not cause any trouble on your system.
-
- However, I take no responsibility for any harm that may occur to your
- system by using this library.
-
- Description:
- ============
-
- The library is designed to be used together with PureC. To use the
- routines you just have to move device.h and device.lib to the corres-
- ponding include/library folder of PureC and add device.lib to your
- project file.
-
- Please notice that if you're running MiNT without HSModem or FastSerial
- started after it in the `Auto' folder, the device library changes
- to the MiNT process execution domain to handle device-I/O in a correct
- way. That means to you that Fread/Fwrite will follow the terminal
- settings (which needs not to be 'RAW' mode!) - actually I don't know
- if this is only valid for devices or also for files. Also filenames
- returned by Fsfirst/Fsnext may be treated differently, i.e. differencing
- between upper/lower case or filenames longer than 8+3 characters.
- This can also effect programs started by yours via Pexec()!
-
- The following routines are available. Please refer to the file
- device.h for further descriptions:
-
- DEV_LIST *InitDevices ( VOID *pause_normal, VOID *pause_super );
- VOID TermDevices ( VOID );
- BOOLEAN OpenDevice ( DEV_LIST *port );
- VOID CloseDevice ( DEV_LIST *port );
- VOID PortParameter( DEV_LIST *port, UWORD flowctl, UWORD charlen, UWORD stopbits, UWORD parity );
- WORD GetBiosNr ( DEV_LIST *port );
- LONG *GetSpeedList( DEV_LIST *port );
- LONG SetDTESpeed ( DEV_LIST *port, LONG speed );
-
- BOOLEAN PortSendByte ( DEV_LIST *port, BYTE c );
- BOOLEAN PortSendBlock( DEV_LIST *port, BYTE *block, LONG len, BOOLEAN tst_dcd );
- WORD PortGetByte ( DEV_LIST *port );
- WORD PortPeekByte ( DEV_LIST *port );
-
- BOOLEAN OutIsEmpty ( DEV_LIST *port );
- BOOLEAN WaitOutEmpty ( DEV_LIST *dev, BOOLEAN tst_dcd, UWORD wait_hundreds );
- BOOLEAN CharAvailable( DEV_LIST *port );
- VOID ClearIOBuffer( DEV_LIST *port, LONG which );
-
- VOID DtrOn ( DEV_LIST *port );
- VOID DtrOff ( DEV_LIST *port );
- BOOLEAN IsCarrier ( DEV_LIST *port );
- VOID StartReceiver( DEV_LIST *port );
- VOID StopReceiver ( DEV_LIST *port );
-
- WORD SetRxBuffer ( DEV_LIST *port, WORD size );
- WORD GetRxBuffer ( DEV_LIST *port );
- WORD SetTxBuffer ( DEV_LIST *port, WORD size );
- WORD GetTxBuffer ( DEV_LIST *port );
-
- VOID get_tos ( WORD *tos );
- BOOLEAN getcookie ( LONG cookie, LONG *value );
- ULONG Get200Hz ( VOID );
- ULONG Calc200Hz ( ULONG time_to_set );
-
- Trailer:
- ========
-
- This library will be supported - or not. This is depending on how
- many people are using - and supporting - this library. If you like
- this library and you're using it in your own programs you should think
- of making a donation for it. Any donation is welcome and will increase
- my motivation of supporting it further.
-
- My bank account:
-
- Jan Kriesten, Citibank
- Kto.-Nr. 0910680784
- BLZ 300 209 00
-
- Any suggestions or bug reports please send to any of the above EMail
- adresses.
-
- =============================[ End of DEVICE.TXT ]==============================
-
-